package com.atwulidun.proxy11.staticproxy;
// 代理类
public class TeacherProxy implements ITeacher {
    // 需要聚合一个被代理对象
    private ITeacher target;

    public TeacherProxy(ITeacher target) {
        this.target = target;
    }

    @Override
    public void teach() {
        System.out.println("上课前准备");
        target.teach();
        System.out.println("下课");
    }
}
